Eclipse Platform
Pre-release 3.0

org.eclipse.jface.text.source
Class AnnotationBarHoverManager

java.lang.Object
  extended byorg.eclipse.jface.text.AbstractInformationControlManager
      extended byorg.eclipse.jface.text.AbstractHoverInformationControlManager
          extended byorg.eclipse.jface.text.source.AnnotationBarHoverManager

public class AnnotationBarHoverManager
extends AbstractHoverInformationControlManager

This manager controls the layout, content, and visibility of an information control in reaction to mouse hover events issued by the vertical ruler of a source viewer.

Since:
2.0

Nested Class Summary
 
Nested classes inherited from class org.eclipse.jface.text.AbstractInformationControlManager
AbstractInformationControlManager.Anchor, AbstractInformationControlManager.IInformationControlCloser
 
Field Summary
 
Fields inherited from class org.eclipse.jface.text.AbstractInformationControlManager
ANCHOR_BOTTOM, ANCHOR_GLOBAL, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, fDisposed, fInformationControl, fInformationControlCloser, fInformationControlCreator
 
Constructor Summary
AnnotationBarHoverManager(ISourceViewer sourceViewer, IVerticalRuler ruler, IAnnotationHover annotationHover, IInformationControlCreator creator)
          Deprecated. As of 2.1, replaced by AnnotationBarHoverManager(IVerticalRulerInfo, ISourceViewer, IAnnotationHover, IInformationControlCreator)
AnnotationBarHoverManager(IVerticalRulerInfo rulerInfo, ISourceViewer sourceViewer, IAnnotationHover annotationHover, IInformationControlCreator creator)
          Creates an annotation hover manager with the given parameters.
 
Method Summary
protected  void computeInformation()
          Computes the information to be displayed and the area in which the computed information is valid.
protected  Point computeInformationControlLocation(Rectangle subjectArea, Point controlSize)
          Computes the location of the information control depending on the subject area and the size of the information control.
protected  Point computeSizeConstraints(Control subjectControl, IInformationControl informationControl)
          Computes the size constraints of the information control in points based on the default font of the given subject control as well as the size constraints in character width.
protected  IAnnotationHover getAnnotationHover()
          Returns the annotation hover for this hover manager.
protected  ISourceViewer getSourceViewer()
          Returns the source viewer for this hover manager.
protected  IVerticalRulerInfo getVerticalRulerInfo()
          Returns the vertical ruler info for this hover manager
 
Methods inherited from class org.eclipse.jface.text.AbstractHoverInformationControlManager
dispose, getHoverEvent, getHoverEventLocation, getHoverEventStateMask, presentInformation, setEnabled
 
Methods inherited from class org.eclipse.jface.text.AbstractInformationControlManager
computeLocation, disposeInformationControl, doShowInformation, getInformationControl, getNextFallbackAnchor, getSubjectArea, getSubjectControl, handleInformationControlDisposed, handleSubjectControlDisposed, hideInformationControl, install, isEnabled, setAnchor, setCloser, setCustomInformationControlCreator, setFallbackAnchors, setInformation, setInformation, setMargins, setSizeConstraints, showInformation, showInformationControl, takesFocusWhenVisible, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationBarHoverManager

public AnnotationBarHoverManager(ISourceViewer sourceViewer,
                                 IVerticalRuler ruler,
                                 IAnnotationHover annotationHover,
                                 IInformationControlCreator creator)
Deprecated. As of 2.1, replaced by AnnotationBarHoverManager(IVerticalRulerInfo, ISourceViewer, IAnnotationHover, IInformationControlCreator)

Creates an annotation hover manager with the given parameters. In addition, the hovers anchor is RIGHT and the margin is 5 points to the right.

Parameters:
sourceViewer - the source viewer this manager connects to
ruler - the vertical ruler this manager connects to
annotationHover - the annotation hover providing the information to be displayed
creator - the information control creator

AnnotationBarHoverManager

public AnnotationBarHoverManager(IVerticalRulerInfo rulerInfo,
                                 ISourceViewer sourceViewer,
                                 IAnnotationHover annotationHover,
                                 IInformationControlCreator creator)
Creates an annotation hover manager with the given parameters. In addition, the hovers anchor is RIGHT and the margin is 5 points to the right.

Parameters:
sourceViewer - the source viewer this manager connects to
annotationHover - the annotation hover providing the information to be displayed
creator - the information control creator
Since:
2.1
Method Detail

computeInformation

protected void computeInformation()
Description copied from class: AbstractInformationControlManager
Computes the information to be displayed and the area in which the computed information is valid. Implementation of this method must finish their computation by setting the computation results using setInformation.

Specified by:
computeInformation in class AbstractInformationControlManager

getAnnotationHover

protected IAnnotationHover getAnnotationHover()
Returns the annotation hover for this hover manager.

Returns:
the annotation hover for this hover manager
Since:
2.1

getSourceViewer

protected ISourceViewer getSourceViewer()
Returns the source viewer for this hover manager.

Returns:
the source viewer for this hover manager
Since:
2.1

getVerticalRulerInfo

protected IVerticalRulerInfo getVerticalRulerInfo()
Returns the vertical ruler info for this hover manager

Returns:
the vertical ruler info for this hover manager
Since:
2.1

computeSizeConstraints

protected Point computeSizeConstraints(Control subjectControl,
                                       IInformationControl informationControl)
Description copied from class: AbstractInformationControlManager
Computes the size constraints of the information control in points based on the default font of the given subject control as well as the size constraints in character width.

Overrides:
computeSizeConstraints in class AbstractInformationControlManager
Parameters:
subjectControl - the subject control
informationControl - the information control whose size constraints are computed
Returns:
the computed size constraints in points

computeInformationControlLocation

protected Point computeInformationControlLocation(Rectangle subjectArea,
                                                  Point controlSize)
Description copied from class: AbstractInformationControlManager
Computes the location of the information control depending on the subject area and the size of the information control. This method attempts to find a location at which the information control lies completely in the display's client area honoring the manager's default anchor. If this isn't possible using the default anchor, the fallback anchors are tried out.

Overrides:
computeInformationControlLocation in class AbstractInformationControlManager
Parameters:
subjectArea - the information area
controlSize - the size of the information control
Returns:
the computed location of the information control

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.